package cn.nubia.admin.api.jinshan.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * 需要检查的文件列表
 * Created by wangj on 2015/7/22.
 */
public class CheckFileList {
    /**
     * 优先级,默认低优先级
     */
    private Integer priority = 0;

    /**
     * 需要扫描包地址
     */
    private List<CheckFile> scanlist = new ArrayList<>();

    /**
     * 添加文件
     * @param url
     * @param md5
     * @param flag
     * @return
     */
    public CheckFileList addScanFile(String url , String md5 , String flag) {
        CheckFile checkFile = new CheckFile();
        checkFile.setMd5(md5);
        checkFile.setUrl(url);
        checkFile.setFlag(flag);
        scanlist.add(checkFile);
        return this;
    }

    public CheckFileList addScanFile(String url , String md5 ) {
        CheckFile checkFile = new CheckFile();
        checkFile.setMd5(md5);
        checkFile.setUrl(url);
        scanlist.add(checkFile);
        return this;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public List<CheckFile> getScanlist() {
        return scanlist;
    }

    public void setScanlist(List<CheckFile> scanlist) {
        this.scanlist = scanlist;
    }
}
